/*
package com.example.hash;

import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.beans.factory.annotation.Autowired;

@SpringBootApplication
public class HashTest implements CommandLineRunner {

    @Autowired
    private GetTextMapper getTextMapper;

    public static void main(String[] args) {
        SpringApplication.run(HashTest.class, args);
    }

    @Override
    public void run(String... args) throws Exception {
        String filePath = "D:\\javaproject\\hash\\src\\main\\resources\\file\\123";

        try {
            String hash = getTextMapper.onlyText(filePath);
            System.out.println("文件哈希值(SHA-256): " + hash);
        } catch (Exception e) {
            System.err.println("计算哈希失败: " + e.getMessage());
            e.printStackTrace();
        }
    }
}*/
